Developer --> Technical Publications
PATHMac OS 8 Developer Documentation > Human Interface Toolbox > Dialog Manager >

Mac OS 8 Dialog Manager Reference


Dialog Manager Data Types

The following Dialog Manager data types are new, changed, or not recommended with Appearance Manager 1.0:


AlertStdAlertParamRec

A standard alert structure of type AlertStdAlertParamRec can be used when you call the function StandardAlert to customize the alert box. The AlertStdAlertParamRec type is available with Appearance Manager 1.0 and later.

struct AlertStdAlertParamRec {
    Boolean             movable;            
    Boolean             helpButton;         
    ModalFilterUPP      filterProc;         
    StringPtr           defaultText;    
    StringPtr           cancelText;         
    StringPtr           otherText;          
    SInt16              defaultButton;  
    SInt16              cancelButton;   
    UInt16              position;           
};
typedef struct AlertStdAlertParamRec AlertStdAlertParamRec;
typedef AlertStdAlertParamRec *AlertStdAlertParamPtr;
movable
A Boolean value indicating whether or not the alert box is movable.
helpButton
A Boolean value indicating whether or not the alert includes a Help button.
filterProc
If the value in the movable field is true (alert is movable), then specify in this parameter a universal procedure pointer to an application-defined filter function that responds to events not handled by ModalDialog . If you do, all events will get routed to your application-defined event filter function for handling, even when your alert box window is in the background. If you set this parameter to nil , the Dialog Manager uses the standard event filter function.
defaultText
Text for button in OK position; see Alert Default Text Constants . The button automatically sizes and positions itself in the alert box. To specify that the default button names should be used, pass -1 . To indicate that no button should be displayed, pass nil .
cancelText
Text for button in Cancel position; see Alert Default Text Constants . The button automatically sizes and positions itself in the alert box. To specify that the default button names should be used, pass -1 . To indicate that no button should be displayed, pass nil .
otherText
Text for button in leftmost position; see Alert Default Text Constants . The button automatically sizes and positions itself in the alert box. To specify that the default button names should be used, pass -1 . To indicate that no button should be displayed, pass nil .
defaultButton
Specifies which button acts as the default button; see Alert Button Constants .
cancelButton
Specifies which button acts as the Cancel button (can be 0); see Alert Button Constants .
position
The alert box position, as defined by a window positioning constant; see Macintosh Toolbox Essentials for a discussion of these constants. In this structure, the constant kWindowDefaultPosition is equivalent to the constant kWindowAlertPositionParentWindowScreen .

'DLOG'

A dialog resource is a resource of type 'DLOG' . All dialog resources can be marked purgeable, and they must have resource ID numbers greater than 127. With Appearance Manager 1.0, the 'DLOG' resource has been changed to support the dialog font table ('dftb') resource; see 'dftb' for a description of the dialog font table resource.

You can use an extended dialog resource with the same resource ID as your dialog resource to provide additional features for your dialog box, including movable modal behavior, Appearance-compliant backgrounds and controls, and embedding hierarchies. See 'dlgx' for a description of the extended dialog resource. Use the GetNewDialog function to create the dialog box defined in the dialog resource and extended dialog resource .

Figure 1-1 shows the format of a compiled dialog resource.

Figure 1-1 Structure of a compiled dialog ('DLOG') resource

The compiled version of a dialog resource contains the following elements:


'dlgx'

Use an extended dialog ('dlgx') resource with the same resource ID as your dialog resource to provide additional features for your dialog box, including movable modal behavior, theme-compliant backgrounds and controls, and embedding hierarchies. The extended dialog resource is available with Appearance 1.0 and later.

All extended dialog resources can be marked purgeable, and they must have the same resource ID and be located in the same file as their corresponding dialog resource. Use the function GetNewDialog to create the dialog box defined in the dialog resource and extended dialog resource .

Figure 1-2 shows the format of a compiled extended dialog resource.

Figure 1-2 Structure of a compiled extended dialog ('dlgx') resource

The compiled version of an extended dialog resource contains the following elements:


'alrx'

You can use an extended alert ( 'alrx' ) resource with the same resource ID as your alert resource to provide additional features for your alert box, including movable modal behavior, Appearance-compliant backgrounds and controls, and embedding hierarchies. The resource also gives you the option of creating a title for movable alert boxes. The extended alert resource is available with Appearance 1.0 and later.


Note

Alert titles are only available with Appearance version 1.0.1 and later.

All extended alert resources can be marked purgeable, and they must have the same resource ID and resource file as their corresponding alert resource. Figure 1-3 shows the structure of a compiled extended alert resource.

Figure 1-3 Structure of a compiled extended alert ('alrx') resource

The compiled version of an extended alert resource contains the following elements:


'dftb'

Your application can specify the initial font settings for all controls in a dialog box or alert box by creating a dialog font table resource of type 'dftb' with the same resource ID as the item list resource ( 'DITL' ). The control font style information in the dialog font table resource is automatically read in (along with the 'DITL' ) by the Dialog Manager. When the 'dftb' resource is read in, the control font styles are set, and the resource is marked purgeable.

When an embedding hierarchy is established in a dialog box, the dialog font table resource should be used instead of the item color table ( 'ictb' ) resource, since edit and static text dialog items become controls in an embedding hierarchy. The dialog font table resource is available with Appearance 1.0 and later.

Figure 1-4 shows the format of a compiled dialog font table resource.

Figure 1-4 Structure of a compiled dialog font table ('dftb') resource

A compiled version of a 'dftb' resource contains the following elements:

Figure 1-5 shows the format of a compiled dialog control font entry in a 'dftb' resource.

Figure 1-5 Structure of dialog control font entry in a 'dftb' resource

Each entry in a 'dftb' resource corresponds to a dialog item and contains the following elements:


'dctb'

The dialog color table resource is not recommended with Appearance Manager 1.0 and later. When the Appearance Manager is available and the kDialogFlagsUseThemeBackground feature bit of the extended dialog resource 'DLOG' is set, the entire dialog color table resource ('dctb') is ignored. If the Appearance Manager is available, but the above is not true, the wContent field of the 'dctb' resource is used, but all other fields are still ignored.


'actb'

The alert color table resource is not recommended with Appearance Manager 1.0 and later. When the Appearance Manager is available and the kAlertFlagsUseThemeBackground feature bit of the extended alert resource is set, the entire alert color table resource ('actb') is ignored. If the Appearance Manager is available, but the kAlertFlagsUseThemeBackground bit is not set, the wContent field of the 'actb' resource is used, but all other fields are still ignored.


'ictb'

The item color table resource is not recommended with Appearance Manager 1.0 and later. When the Appearance Manager is available and an embedding hierarchy is established in the dialog box, any item color table ('ictb') resource information is ignored. The dialog font table ('dftb') resource should be used instead of the item color table resource to specify the font settings for all dialog items in an embedding hierarchy.

If an embedding hierarchy is not established, the item color table resource can be used to set the font information for any editable text and static text dialog items, but the dialog font table resource will still be used for any controls in the dialog box.


© 1998 Apple Computer, Inc. - (Last Updated 19 Nov 98)

Previous | Back Up One Level | Next |